package cn.org.donald.framework.handler;

import cn.org.donald.framework.pojo.BaseResult;

/**
 * @author ： Donald
 * @date ： 2020/10/21 20:08
 * @description：
 */
public class ServiceException extends RuntimeException implements BaseResult {

    private Integer code;

    private String info;

    private Long timestamp;

    private Object error;

    public ServiceException() {
        this.timestamp = System.currentTimeMillis();
    }

    public ServiceException(Integer code, String info) {
        this.code = code;
        this.info = info;
        this.timestamp = System.currentTimeMillis();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public Object getError() {
        return error;
    }

    public void setError(Object error) {
        this.error = error;
    }
}
